package com.automannn.springboot.practice.applicationType;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author automannn
 * @time 2021/9/30
 */
public class ApplicationTypeTest {
    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(NormalBean.class);
//        springApplication.setWebApplicationType(WebApplicationType.REACTIVE);
//        springApplication.setWebApplicationType(WebApplicationType.SERVLET);
       ConfigurableApplicationContext applicationContext= springApplication.run(args);
        System.out.println("读取属性:"+applicationContext.getEnvironment().getProperty("myName"));
    }

    public static class NormalBean{}
}
